package com.yungu.swift.report.controller;

import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.model.admin.AdminReportParam;
import com.yungu.swift.report.entity.ReportUserActiveDay;
import com.yungu.swift.report.service.UserActiveDayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 用户活跃数控制器
 */
@RestController
@RequestMapping("/report/userActiveDay")
@Api(value = "【用户】", tags = "用户活跃数")
public class UserActiveDayCtrl {
    @Autowired
    private UserActiveDayService userActiveDayService;

    @PostMapping("/queryIndex")
    @ApiOperation(value = "每日新注册用户量", httpMethod = "POST")
    public ResponseData<List<ReportUserActiveDay>> queryIndex(@RequestBody AdminReportParam reportParam) {
        return userActiveDayService.queryIndex(reportParam);
    }
}
